from sqlormx_generator import Generator

HOST = '192.168.150.6'

PGSQL = {
    'host': HOST,
    'port': 5432,
    'user': 'postgres',
    'password': '123456',
    'database': 'postgres',
    'show_sql': True,
    'debug': True,
}

MYSQL = {
    'host': HOST,
    'port': 3306,
    'user': 'root',
    'password': 'investment',
    'database': 'investment',
    'show_sql': True,
    'debug': True,
    # 'pool_size': 2,
    'driver': 'pymysql'
}


if __name__ == '__main__':
    # import sqlexecx as db
    # coder = Generator(**PGSQL)
    # coder = Generator(**MYSQL)
    coder = Generator('/Users/summy/project/python/sqlx-exec/test/test.db', show_sql=True)
    # # coder.generate_with_tables(tables=['user', 'person'], path='models.py')
    coder.generate_with_schema(path='models.py', is_dataclass=True)



